package cn.practice._05mvcboot02.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class UserArticleDTO {

    @NotEmpty(message = "标题不能为空")
    @Size(min = 1, max = 20, message = "标题长度必须在1-20之间")
    @ApiModelProperty(value = "标题", required = true)
    private String title;

    @NotEmpty(message = "内容不能为空")
    @Size(min = 20, max = 1000, message = "内容长度必须在20-1000之间")
    @ApiModelProperty(value = "内容", required = true)
    private String content;
}
